home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / daemons / ipServer / udp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-26  |  1.8 KB  |  56 lines

  1. /*
  2.  * udp.h --
  3.  *
  4.  *    Declarations of external UDP-related routines.
  5.  *
  6.  * Copyright 1987 Regents of the University of California
  7.  * All rights reserved.
  8.  * Permission to use, copy, modify, and distribute this
  9.  * software and its documentation for any purpose and without
  10.  * fee is hereby granted, provided that the above copyright
  11.  * notice appear in all copies.  The University of California
  12.  * makes no representations about the suitability of this
  13.  * software for any purpose.  It is provided "as is" without
  14.  * express or implied warranty.
  15.  *
  16.  *
  17.  * $Header: /sprite/src/daemons/ipServer/RCS/udp.h,v 1.5 89/08/15 19:55:55 rab Exp $ SPRITE (Berkeley)
  18.  */
  19.  
  20. #ifndef _IPS_UDP
  21. #define _IPS_UDP
  22.  
  23. #include "sprite.h"
  24.  
  25. /*
  26.  * UDP_MAX_DATAGRAM_SIZE defines how big a datagram can be sent via UDP.
  27.  * It has to be at least a bit over 8K to allow NFS to send 8K of data
  28.  * plus some header information.
  29.  * UDP_REQUEST_BUF_SIZE defines the size of the pseudo-device request buffer.
  30.  * It is made large enough to hold the datagram, plus pseudo-device
  31.  * header, plus a UDP/IP header.  This way we can assemble (and fragment)
  32.  * datagrams as they sit in the pseudo-device request buffer.
  33.  */
  34. #define UDP_MAX_DATAGRAM_SIZE    9000
  35. #define UDP_REQUEST_BUF_SIZE    (UDP_MAX_DATAGRAM_SIZE)
  36.  
  37. /*
  38.  * UDP_WRITE_BEHIND - if this is TRUE then asynchronous writes are allowed
  39.  * to the UDP request buffer.
  40.  */
  41. #define UDP_WRITE_BEHIND    TRUE
  42.  
  43. extern void        UDP_Init();
  44. extern void        UDP_RequestHandler();
  45. extern ReturnStatus    UDP_SocketOpen();
  46. extern ReturnStatus    UDP_SocketClose();
  47. extern ReturnStatus    UDP_SocketRead();
  48. extern ReturnStatus    UDP_SocketWrite();
  49. extern int        UDP_SocketSelect();
  50. extern ReturnStatus    UDP_SocketBind();
  51. extern ReturnStatus    UDP_SocketConnect();
  52. extern ReturnStatus    UDP_SocketShutdown();
  53. extern void        UDP_SocketInput();
  54.  
  55. #endif /* _IPS_UDP */
  56.